const fs = require('fs');
const {
  PICTURES_PATH, 
} = require('../constants/file-path');

// 删除图片
const removeImg = path => {
  fs.unlink(`${PICTURES_PATH}/${path}`, err => {
    if (err) {
      console.log(err);
      return false;
    }
    
    console.log('删除图片成功！');
  })
}

module.exports = {
  removeImg
}
